﻿using Mockery.Core;
using NUnit.Framework;
using Rhino.Mocks;

namespace Mockery.UnitTest
{
    [TestFixture]
    public class ArrangementTests
    {   
        [Test]
        public void Arrangement_CreateStrictMockTest()
        {
            var mocks = new MockRepository();
            var typeCache = mocks.Stub<ITypeCache>();

            Assert.That(new Arrangement(mocks, typeCache).AddStrictMock<IArrangement>().GetType().Name,
                        Is.StringStarting("IArrangement"));
        }

        [Test]
        public void Arrangement_CreateDynamicMockTest()
        {
            var mocks = new MockRepository();
            var typeCache = mocks.Stub<ITypeCache>();

            Assert.That(new Arrangement(mocks, typeCache).AddDynamicMock<IArrangement>().GetType().Name,
                        Is.StringStarting("IArrangement"));
        }

        [Test]
        public void Arrangement_CreateStubTest()
        {
            var mocks = new MockRepository();
            var typeCache = mocks.Stub<ITypeCache>();

            Assert.That(new Arrangement(mocks, typeCache).AddStub<IArrangement>().GetType().Name, Is.StringStarting("IArrangement"));
        }

    }
}
